interface normalAdmin {
  id?: number
  name?: string
  role?: string
  dept?: string
  age: number
}

interface Imenus {
  id: number
  path: string
}

type IdAndPath = Imenus

interface superAdmin {
  id: number
  name: string
  menus: IdAndPath
  role: number
  age: number
}

function getSuperAdmin(params: superAdmin[]) {
  console.log(params)
}

function getMinAge(params: Array<normalAdmin>): normalAdmin {
  return params.sort((a, b) => b.age - a.age)[0]
}

let res = getMinAge([
  { id: 1, name: '李', age: 12 },
  { id: 2, name: '彭', age: 133 },
  { id: 3, name: '陆', age: 16 },
  { id: 4, name: '胡', age: 23 },
  { id: 5, name: '付', age: 123 },
])

console.log(res)
